#! /bin/bash
## author:XueXianqi

echo `date '+%Y-%m-%d %H:%M:%S'` '正在为您安装Docker'
sudo sudo apt-get remove docker docker-engine docker.io containerd runc -y
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-cache madison docker-ce
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
sudo service docker start
echo `date '+%Y-%m-%d %H:%M:%S'` 'Docker安装完成'
